package acs.bridge.dao;

import org.springframework.jdbc.core.JdbcTemplate;

import java.math.BigDecimal;

/**
 * acs.bridge.dao
 * User: kuznetsovstv
 * Date: 26.06.13
 * Time: 17:15
 */
public class bm_load_fileImpl {
    private JdbcTemplate jdbcTemplate;

    public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
        this.jdbcTemplate = jdbcTemplate;
    }

    public JdbcTemplate getJdbcTemplate() {
        return jdbcTemplate;
    }


     public void insertRawFile(String a_table_name,String a_fr_id, String a_FileName, String a_path, String a_lastModified,BigDecimal a_file_size) {
          this.jdbcTemplate.update("insert into " + a_table_name + " (fr_id,file_name,file_path,z_date,last_modified,file_size) values (?,?,?,TO_DATE(?,'ddmmyyyy hh24miss'),TO_DATE(?,'ddmmyyyy hh24miss'),?)", new Object[]{a_fr_id, a_FileName, a_path, a_lastModified,a_lastModified,a_file_size});
      }


  /*  public void final_processing(BigDecimal taskID,String a_meta_tag) {
        this.jdbcTemplate.update("{call fbu_wm.final_" + a_meta_tag + "(?)}", new Object[]{taskID});
    }
   */

}
